<!--
 * @description  : 反馈记录list
 * @descriptionDetail: 反馈记录list
 * @copyright    : 浙江烟草
 * @author       : dw
 * @create       : 2022-10-09 22:21:21
-->
<template>
  <view class="single-page">
    <theme-navbar
      :isBack="false"
      :is-white="false"
      title="反馈记录"
      customClass="cls"
      style="z-index: 99999"
    >
      <view class="nav-right-icon" @click="handlerConfirm">
        关闭
      </view>
    </theme-navbar>
    <view class="content" style="padding-top: 44px;">
      <list-view
        :i="0"
        :index="0"
        :height="getListViewHeight()"
        :load-data="myLoadData"
        :noMoreDataTipShow="false"
        :init-load="false"
        :useUp="false"
        ref="mescrollItem"
        class="listview"
      >
        <template slot-scope="d">
          <view class="his-item">
            <view class="his-row">
              <text class="his-row-l">
                操作类型：
              </text>
              <text class="his-row-r">
                {{ d.data.typeName }}
              </text>
            </view>
            <view class="his-row">
              <text class="his-row-l">
                调查时间：
              </text>
              <text class="his-row-r">
                {{ d.data.time }}
              </text>
            </view>
            <view class="his-row">
              <text class="his-row-l">
                调查备注：
              </text>
              <text class="his-row-r">
                {{ d.data.remark }}
              </text>
            </view>
          </view>
        </template>
      </list-view>
    </view>
  </view>
</template>

<script>
import listView from "@/components/list_view.vue";
import MescrollMoreMixin from "@/components/mescroll-uni/mixins/mescroll-more.js";
export default {
  name: "FeedBackHisComponent",
  components:{listView,},
  mixins:[MescrollMoreMixin,],
  props: {
    record:{
      type:Object,
      default:() => { return {}; },
    },
    hp:{ // 高度的百分比
      type: Number,
      default: 0.8,
    },
  },
  data() {
    return {
    };
  },
  created() {
  },
  methods: {
    // 确认
    handlerConfirm() {
      this.$emit('close', true);
    },
    getListViewHeight(){
      return (this.$u.sys().windowHeight * this.hp - 54) + 'px';
    },
    myLoadData(page){
      return new Promise((resolve, reject) => {
        let his = JSON.parse(this.record.resultHis);
        resolve({
          data:{
            list:his,
            totalCount:his.length,
          },
        })
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.single-page {
  .nav-right-icon {
    color: #FFF;
    margin-right: 15px;
  }
}
.listview{

}
.his-item{
  width: 100%;
  padding: $cm-conent-padding-column $cm-content-paddng-row;
  border-bottom: 1px solid $cm-form-item-bottom-border-color;
}
.his-row{
  width: 100%;
  display: inline-flex;
  flex-direction: row;
  margin-top: 5rpx;
  margin-bottom: 5rpx;
  justify-content: flex-start;
  .his-row-l{
	font-size: 28rpx;
	font-weight: 400;
	flex-shrink: 0;
	color: $cm-form-item-label-color;
  }
  .his-row-r{
	margin-left: 16rpx;
	font-size: 28rpx;
	font-weight: 400;
	color: $u-main-color;
	word-break: break-all;
  }
}
.cls{
	position: fixed;
	top: 0;
}
</style>
